import request from "@/utils/request";

const BASE_URL = "/supervisor-api/feedback";

class FeedbackAPI {
  /**
   * 登录API
   *
   * @param data 登录数据
   * @returns 登录结果
   */
  static submitFeedback(data: any) {
    return request<any, any>({
      url: `${BASE_URL}/feedback`,
      method: "post",
      data: {
        fprovince: data.province,
        fcity: data.city,
        faddress: data.location,
        aqiPreId: data.aqi,
        finfo: data.feedback,
        fileUploadImgId: data.fileUploadImgId,
      },
      headers: {
        "Content-Type": "application/json",
      },
    });
  }

  static feedbackList(data: any) {
    return request<any, any>({
      url: `${BASE_URL}/getFeedbackList`,
      method: "post",
      data,
      headers: {
        "Content-Type": "application/json",
      },
    });
  }
}

export default FeedbackAPI;
